package com.grass.p019lv.novel.adapter;

import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.androidsa.bttsddka.R;
import com.androidx.p013lv.base.recycler.BaseRecyclerAdapter;
import com.androidx.p013lv.base.recycler.BaseRecyclerHolder;
import com.grass.p019lv.bean.SearchNovelHotRecommendBean;

/* renamed from: com.grass.lv.novel.adapter.AdapterSearchHotRecommend */
public class AdapterSearchHotRecommend extends BaseRecyclerAdapter<SearchNovelHotRecommendBean.SearchNovelHotRecommendData, Holder> {
    private String domain;

    public void setDomain(String str) {
        this.domain = str;
    }

    public void MyHolder(Holder holder, int i) {
        holder.setData((SearchNovelHotRecommendBean.SearchNovelHotRecommendData) getDataInPosition(i), i);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public Holder onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new Holder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_search_hot_recommend, viewGroup, false));
    }

    /* access modifiers changed from: package-private */
    /* renamed from: com.grass.lv.novel.adapter.AdapterSearchHotRecommend$Holder */
    public class Holder extends BaseRecyclerHolder {
        TextView tv_no;
        TextView tv_title;

        Holder(View view) {
            super(view);
            this.tv_no = (TextView) view.findViewById(R.id.tv_no);
            this.tv_title = (TextView) view.findViewById(R.id.tv_title);
        }

        /* access modifiers changed from: package-private */
        public void setData(SearchNovelHotRecommendBean.SearchNovelHotRecommendData searchNovelHotRecommendData, int i) {
            if (i == 0) {
                this.tv_no.setTextColor(Color.parseColor("#FF4242"));
            } else if (i == 1) {
                this.tv_no.setTextColor(Color.parseColor("#FF6B62"));
            } else if (i == 2) {
                this.tv_no.setTextColor(Color.parseColor("#F7B500"));
            } else {
                this.tv_no.setTextColor(Color.parseColor("#666666"));
            }
            TextView textView = this.tv_no;
            textView.setText((i + 1) + "");
            TextView textView2 = this.tv_title;
            textView2.setText(searchNovelHotRecommendData.getFictionTitle() + "");
        }
    }
}
